package com.yang.mapper;

import com.yang.pojo.UserInfo;
import com.yang.responseEntity.Employeeleave;
import com.yang.responseEntity.Interns;
import com.yang.responseEntity.regularEmployee;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Author 杨天可
 * @Date 2021/2/26 15:52
 * @Version 1.0
 */
public interface UserInfoMapper extends Mapper<UserInfo> {

    //根据id查找用户
    UserInfo findById(Integer id);
    //根据用户查找用户
    UserInfo findByUsername(String username);
    //所有用户信息模糊查找
    List<UserInfo> getUserInfoListByPage(String username);
    //停用当前用户
    int deleteUserInfoById(Integer id);

    UserInfo findByPohne(String phone);

    List<Map<String, Object>> getEmployeeInfoByPage();

    List<regularEmployee> getUserInfoList(String username, Integer workType);

    List<Interns> getUserInfoListInterns(String username, Integer workType);

    List<Employeeleave> getUserInfoListLeave(String username);
}
